<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <style>
        .div {
            /* font-size: 20px; */
        }

        .p {
            font-size: 2em;
        }

        .span {
            font-size: 0.5em;
        }
    </style>

    <div class="div">div 标签中的文字大小为 20px
        <p class="p">P 标签中的文字大小为 2em
            <span class="span">span标签中的文字大小为0.5em</span>
        </p>
    </div>
</body>

</html>